<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <title>男装专区</title>
    <link rel="stylesheet" type="text/css" href="<%=path %>/statics/css/loaders.min.css"/>
    <link rel="stylesheet" type="text/css" href="<%=path %>/statics/css/loading.css"/>
    <link rel="stylesheet" type="text/css" href="<%=path %>/statics/css/base.css"/>
    <link rel="stylesheet" type="text/css" href="<%=path %>/statics/css/style.css"/>
     <script src="<%=path %>/statics/js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript">
    	$(window).load(function(){
    		var xing=5;
    		var anonymity=2;
    		var cntent="";
    		$("#xing").val(xing);
    		$(".loading").addClass("loader-chanage")
    		$(".loading").fadeOut(300);
    	})
    </script>
</head>
<!--loading页开始-->
<div class="loading">
	<div class="loader">
        <div class="loader-inner pacman">
          <div></div>
          <div></div>
          <div></div>
          <div></div>
          <div></div>
        </div>
	</div>
</div>
<!--loading页结束-->
<body>
	<header class="top-header fixed-header">
		<a class="icona" href="javascript:history.go(-1)">
				<img src="<%=path %>/statics/images/left.png"/>
			</a>
		<h3>去评价</h3>
			
			<a class="iconb" href="shopcar.html">
			</a>
	</header>
	<form id="comment" action="<%=path%>/comments/addcomm.html" method="post">
	<div class="contaniner fixed-cont">
		<section class="assess">
				<p>
					<img src="<%=path %>/statics/files/${fileName }"/>
					<textarea rows="5" placeholder="请写下对宝贝的感受吧，对他人帮助很大哦" id="cntent" name="cntent"></textarea>
				</p>	
				<ul>
					<li>
						商品评价
					</li>
					<li class="assess-right">
						<img onclick="level(1)" src="<%=path %>/statics/images/detail-iocn01.png"/>
						<img onclick="level(2)" src="<%=path %>/statics/images/detail-iocn01.png"/>
						<img onclick="level(3)" src="<%=path %>/statics/images/detail-iocn01.png"/>
						<img onclick="level(4)" src="<%=path %>/statics/images/detail-iocn01.png"/>
						<img onclick="level(5)" src="<%=path %>/statics/images/detail-iocn01.png"/>
					</li>
				</ul>
		</section>
	</div>
	<!--设置隐藏域传递值  -->
	<input type="hidden"  value="${pid }" id="pid" name="pid">
	<input type="hidden"  value="${uid }" id="userid" name="userid">
	<input type="hidden"  value="${orderid }" id="orderdetaid" name="orderdetaid">
	<input type="hidden"  id="xing" name="xing">
	<input type="hidden"  id="anonymity" name="anonymity" value="2">
	<footer class="assess-footer fixed-footer ">
		<ul>
			<li>
				<input type="checkbox" id="ass"/>
				<label for="ass" onselectstart="return false">匿名评价</label>
			</li>
			<input type="button" value="发表评论"  id="tijiao"/>
		</ul>
	</footer>
	</form>
	<script type="text/javascript">
		$(".assess-footer ul li label").on('touchstart',function(){
			if($(this).hasClass('assd')){
				$(".assess-footer ul li label").removeClass("assd");
				$("#anonymity").val(2);
			}else{
				$(".assess-footer ul li label").addClass("assd");
				$("#anonymity").val(1);
			};
		});
		$("#tijiao").bind("click",function(){
			if(confirm("是否确认提交数据")){
				 cntent=$("#cntent").val();
				 $("#comment").submit();
			}
			
			
		});
	
		function level(s)
	{
			xing=s;
			$("#xing").val(xing);
	var str = '';

	var k = 6-s;
	
	for(i=1;i<s+1;i++)
	{	
		str += "<img onclick='level("+i+")' src='<%=path %>/statics/images/detail-iocn01.png'/>";
	}
	for(j=1;j<k;j++)
	{
		var d=j+s
		str += "<img onclick='level("+d+")' src='<%=path %>/statics/images/detail-iocn001.png'/>";
	}


	$('.assess-right').html(str);
	
}
  	
	</script>
</body>
</html>